﻿<!DOCTYPE html>
<!--总总体评评估项目详细-->
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>


</head>
<body>


    <div id="app" v-cloak class="popupW100"> 

        <el-form :model="Form" status-icon :rules="rules" ref="ruleForm" label-width="100px" size="mini">
            <el-row>
                <el-col :span="11">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input type="text" v-model="Form.CheckProject" autocomplete="off" size="mini">
                                <template slot="prepend">
                                    {{OverallAssessmentType.CheckProject+mark.m}}
                                </template>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>


                <el-col :span="11" :offset="2">
                    <el-form-item :label="OverallAssessmentType.TheWeight+mark.m" class="inputTextarea">
                        <!-- 弹出页的其它不能成组的控件添加class="inputTextarea"，达到label与input、select等控件的label对齐的目的 -->
                        <el-input-number v-model="Form.TheWeight" @change="handleChange" :min="0"></el-input-number>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row type="flex" justify="center">
                <el-form-item>
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnConfirm}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
    </div>
    <script type="text/javascript">
        var app = new Vue({
            el: '#app',
            data: {
                //父业传参
                id: '',
                //业务表单内容
                Form: {
                    CheckProject: '',
                    TheWeight: '',
               
                },

                //表单验证
                rules: {
                    CheckProject: [
                        verification.NotNull
                    ],
                     TheWeight: [
                        verification.NotNull
                    ]
                }
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                handleChange: function (value) {
                    console.log(value);
                },
                //提交数据
                onSubmitForm: function (formName) {
                    var mythis = this;
                    this.$refs[formName].validate(function (valid) {
                        //验证通过
                        if (valid) {
                            parent.app.Form.CheckProjectList.push({
                                CheckProject: mythis.CheckProject,
                                TheWeight: mythis.TheWeight,
                            });
                            parent.app.ListItem.dialogVisible = false;
                        } else {
                            //验证失败
                            return false;
                        }
                    });
                }
            },
            mounted: function () {


            },
        });
    </script>
</body>
</html>